import { Component, Fragment } from 'react';
import { Button } from 'antd-mobile';

export class Home extends Component {
  constructor(props) {
    super(props)
    this.state = {}
  }
  toPage() {
    this.props.history.go(-1)
  }

  componentDidMount() {
    const query = new URLSearchParams(this.props.history.location.search)
    console.log(query.get('params'))
  }

  render() {
    return (
      <Fragment>
        <p>Home</p>
        <span>6666</span>
        <Button block onClick={()=> this.toPage()}>上一页</Button>
      </Fragment>
    )
  }
}